<?php use_helper('Window') ?>

<h1>User Profile</h1>
<label>Email</label>
<?php echo $userx->getUsername(); ?><br /><br />
<label>First Name</label>
<?php if(is_null($tutor[0]->getFirstName())): ?>
  First Name not set
<?php else: ?>
  <?php echo $tutor[0]->getFirstName(); ?>
<?php endif; ?><br /><br />
<label>Last Name</label>
<?php if(is_null($tutor[0]->getLastName())): ?>
  Last Name not set
<?php else: ?>
  <?php echo $tutor[0]->getLastName(); ?>
<?php endif; ?><br /><br />
<label>Rates</label>
<?php if(is_null($tutor[0]->getRates())): ?>
  Rates not set
<?php else: ?>
  $<?php echo $tutor[0]->getRates(); ?>
<?php endif; ?><br /><br />
<label>Additional Info</label>
<?php if(is_null($tutor[0]->getAdditionalInfo())): ?>
  Additional Info not set
<?php else: ?>
  <?php echo $tutor[0]->getAdditionalInfo(); ?>
<?php endif; ?><br /><br />

<label>Availability</label>
<?php if($availabilities): ?>
  <?php foreach($availabilities as $availability): ?>
    <?php echo $availability->getName(); ?><br />
  <?php endforeach; ?><br />
<?php else: ?>
  Availability not set<br /><br />
<?php endif; ?>
<label>Service Area</label>
<?php if($servicearea): ?>
  <?php echo $servicearea->getName(); ?><br /><br />
<?php else: ?>
  Service Area not set<br /><br />
<?php endif; ?>
<label>Subjects</label>
<?php if($subjects): ?>
  <?php foreach($subjects as $subject): ?>
    <?php echo $subject->getName(); ?><br />
  <?php endforeach; ?>
<?php else: ?>
  Subject not set<br /><br />
<?php endif; ?>
<?php if($enableedit): ?>
  <br /><br />
  <label>Edit Profile</label><?php echo link_to(image_tag('vcard_edit','class="no-border"'),'@edituser'); ?>
<?php else: ?>
  <br /><br />
  <label>Contact Tutor</label><?php echo link_to_prototype_window(image_tag('email_go','class="no-border"'),'mail'.$tutor[0]->getId(),array('title' => 'Contact Tutor','width' => '500','height' => '500','url' => '/tutor/mail?email='.$userx->getUsername(),'className' => 'theme1','center' => 'true')); ?>
<?php endif; ?>